import requestProxy from '@/utils/request';

const { request } = requestProxy;

// 新增自定义部门
export function customDepartmentCreate(data) {
  return request({
    url: '/admin/department/create',
    method: 'post',
    data
  });
}

// 编辑自定义部门
export function customDepartmentEdit(data) {
  return request({
    url: '/admin/department/edit',
    method: 'put',
    data
  });
}

// 删除自定义部门
export function customDepartmentDelete(data) {
  return request({
    url: '/admin/department/delete',
    method: 'delete',
    data
  });
}

// 已删除部门列表
export function deletedDeptList(params) {
  return request({
    url: '/admin/department/deletedDept/list',
    method: 'get',
    params
  });
}

// 设置用户为主管
export function setUserLeader(data) {
  return request({
    url: '/admin/user/leaderConfig',
    method: 'put',
    data
  });
}

